/***********************************
* Name: CodeJump.java
* Date: Oct 18, 2010
* @author martin
* Description:
***********************************/

package asmCodeGen;


public class CodeJump implements AsmCode {
    
    private String opcode;
    private String label;
    private boolean tab;

    /***********************************
     * constructor
     * @param opcode
     * @param label
     ***********************************/
    public CodeJump(String opcode, String label){
        this.opcode = opcode;
        this.label = label;
        tab=true;
    }
    
    /***********************************
     * constructor
     * @param opcode
     * @param label
     ***********************************/
    public CodeJump(String opcode, String label, boolean tab){
        this.opcode = opcode;
        this.label = label;
        this.tab=tab;
    }
    
    /***********************************
     * @return the code
     ***********************************/
    public String getCode() {
        return ((tab)?"\t":"")+opcode+"\t"+label;
    }

}